package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 路由组 实体
 * </p>
 *
 * @author 黄露
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
// "DeviceRouteGroup对象", description = "路由组")
public class DeviceRouteGroup extends Model<DeviceRouteGroup> {

  private static final long serialVersionUID = 1L;

  // "路由组id")
  @TableId(value = "route_group_id", type = IdType.AUTO)
  private Integer routeGroupId;

  // "部门名称")
  private Integer deptId;

  // "路由组名称")
  private String groupName;

  // "备注")
  private String remark;

  // "创建人")
  private String createBy;

  // "创建时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  @Override
  public Serializable pkVal() {
    return this.routeGroupId;
  }


  @TableField(exist = false)
  private List<DeviceRoute> deviceRouteList;

}
